﻿@model PagedList<NFine.Domain.Entity.ProductManage.ProductEntity>
@using Webdiyer.WebControls.Mvc;
@{
    ViewBag.Title = "产品展示";
    Layout = "~/Views/Shared/_Index.cshtml";
}
<style>
    body {
        background-color: #fff;
    }

    .content {
        width: 100%;
        margin-left: 10px;
    }

    .proCon {
        display: inline-block;
        margin-left: 10px;
        margin-top: 10px;
    }

    .proInfo {
        border: 1px solid #eee;
        width: 260px;
    }

    .proImg {
        margin: 8px;
    }

    .info {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 8px;
    }

    .price {
        color: #f40;
        font-size: 16px;
    }

    .proName {
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .proInfo a {
        text-decoration: none;
    }
    .pagination>li>a, .pagination>li>span{
        color:rgb(44,62,80);
    }
    .pagination>.active>a{
        background-color:rgb(44,62,80);
        border-color:rgb(44,62,80);
    }
</style>

<div class="content" id="divContent">
    @foreach (var pro in Model)
    {
        <div class="proCon">
            <div class="proInfo">
                <a href="ProductInfo?id=@pro.F_Id" >
                    <div class="proImg">
                        <img src="@pro.F_ImageUrl" style="width:100%;">
                    </div>
                    <div class="info">
                        <div>
                            <span class="price">
                                <strong>
                                    ¥ @pro.F_Price.Value.ToString("F2")
                                </strong>
                            </span>
                            <span style="float:right">销量：@pro.F_SaleCounts </span>
                        </div>
                        <div class="proName">@pro.F_ProductName</div>
                    </div>
                </a>
            </div>
        </div>
    }
</div>
<div style="text-align: center;">
    @{
        @Ajax.Pager(Model, new PagerOptions
   {
       PageIndexParameterName = "pageId",
       ControllerName = "Product",
       ContainerTagName = "ul",
       CssClass = "pagination",
       FirstPageText = "首页",
       PrevPageText = "上一页",
       NextPageText = "下一页",
       LastPageText = "末页",
       CurrentPagerItemTemplate = "<li class=\"active\"><a href=\"#\">{0}</a></li>",
       DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>",
       PagerItemTemplate = "<li>{0}</li>",
        
   }
    )
    }
</div>